<extend name="./Application/Admin/View/base.html" />
<block name="title"><title><?php echo C(APP_NAME);?>PC端管理</title></block>
<block name="stylesheets">
<link href="__PUBLIC__/assets/css/select2.css" rel="stylesheet">

</block>
<block name="stylecss">
<style type='text/css'>
    table tr td{
        width: 80%;
    }
    table tr th{
        width: 16%;
        text-align: center;
        vertical-align: middle!important;
    }
</style>
</block>
<block name="smallmenu">
<ul class="breadcrumb">
	<li>
		<i class="ace-icon fa fa-home home-icon"></i>
		<a href="{:U('Index/index')}">主页</a>
	</li>
    <li>
		<a href="{:U('Mrmidi/index')}">迷笛先生列表</a>
	</li>
	<li class="active">修改迷笛先生信息</li>
</ul><!-- /.breadcrumb -->

<!-- #section:basics/content.searchbox -->
<div class="nav-search" id="nav-search"></div><!-- /.nav-search -->
</block>
<block name="content">
<form action="__CONTROLLER__/mrmidi_edit" method='post' id='myformedit' class="myformedit" enctype="multipart/form-data">
<input type="hidden" id='user_ids' name='user_id' value="{$user_arr.user_id}">
<input type="hidden" name='action' value="mrmidi_edit_action">
<div class="row" style="margin-bottom:7px">
    <div class="col-xs-12"><span class="label label-warning arrowed"><i class="ace-icon fa fa-user bigger-120"></i> 基本信息</span></div>
</div>
<table class="table table-striped table-bordered table-hover" >
    <tr>
        <th>头像</th>
        <td>
            <div class="nfile_imgbox" >
                <input type="file" class="nfile" id="file_upload" name="avatar" />
                <?php if (!empty($user_arr['user_avatar'])) { ?>
                <img src="{$user_arr.user_avatar}" id="preview">
                <?php }else{ ?>
                <img src="__PUBLIC__/assets/images/addfile.png" id="preview">
                <?php } ?>
                <a class="nimg_style">+<img src=""> </a>
            </div>
        </td>
    </tr>
    <tr>
        <th>昵称</th>
        <td><input type="text" name='user_nickname' value="{$user_arr.user_nickname}" class="col-xs-6 nickname">
        	<span class="Validform_checktip">必填项</span>
        </td>
    </tr>
    <tr>
        <th>手机号</th>
        <td><input type="text" id="user_edit_phone" name='user_phone' value="{$user_arr.user_phone}" class="col-xs-6 ninputxt">
        <span class="Validform_checktip">必填项</span>
        </td>
    </tr>
    <tr>
        <th>邮箱</th>
        <td><input type="text" name='user_email' value="{$user_arr.user_email}" class="col-xs-6 ninputemail">
        <span class="Validform_checktip">必填项</span>
        </td>
    </tr>
</table>

<div class="row" style="margin-bottom:7px">
    <div class="col-xs-12"><span class="label label-success arrowed"><i class="ace-icon fa fa-user bigger-120"></i> 详细信息</span></div>
</div>
<table class="table table-striped table-bordered table-hover" >
    <tr>
        <th>姓名</th>
        <td><input type="text" name='user_name' value="{$user_arr.user_name}" placeholder="{$user_arr.user_name}" class="col-xs-6 nname">
        <span class="Validform_checktip">必填项</span>
        </td>
    </tr>
    <tr>
        <th>性别</th>
        <td><if condition="($user_arr.user_sex eq 1)">
            <input type="radio" name="user_sex" id="" value="1" checked="checked">男&nbsp;&nbsp;
            <input type="radio" name="user_sex" id="" value="2">女
        <else />
            <input type="radio" name="user_sex" id="" value="1">男&nbsp;&nbsp;
            <input type="radio" name="user_sex" id="" value="2" checked="checked">女
        </if></td>
    </tr>
    <tr>
        <th>生日</th>
        <td>

        	<div class="input-group col-xs-6">
            <input class="form-control date-picker" type="text" data-date-format="yyyy-mm-dd" name='user_birthday' value="{$user_arr.user_birthday}">
            <span class="input-group-addon">
                <i class="fa fa-calendar bigger-110"></i>
            </span>
        </div></td>
    </tr>
    <tr>
        <th>身份证号码</th>
        <td><input type="text" name='user_idcard' value="{$user_arr.user_idcard}" placeholder="{$user_arr.user_idcard}" class="col-xs-6 ninputxt">
        <span class="Validform_checktip">必选项</span>
        </td>
    </tr>
    <tr>
        <th>城市</th>
        <td><select name="user_city" id="sel">
        <volist name="citys" id="vo">
            <option value = "{$vo.city_id}"
            <?php if ($vo['city_id']==$user_arr['user_city']): ?>
                selected
            <?php endif ?>
            >{$vo.city_name}</option>
        </volist>
        </select></td>
    </tr>
    <tr>
        <th>所属迷笛club</th>
        <td><select name="user_midiclub_id" id="sel">
            <option value="0">无</option>
        <volist name="clubs" id="vo">
            <option value = "{$vo.midiclub_id}"
            <?php if ($vo['midiclub_id']==$user_arr['user_midiclub_id']): ?>
                selected
            <?php endif ?>
            >{$vo.midiclub_name}</option>
        </volist>
        </select></td>
    </tr>
    <tr>
        <th>所属机构</th>
        <td><input type="text" name='user_orgname' value="{$user_arr.user_orgname}" placeholder="{$user_arr.user_orgname}" class="col-xs-6 ninputxt">
        <span class="Validform_checktip">必选项</span>
        </td>
    </tr>
    <tr>
        <th>个人简介</th>
        <td>
        <textarea name='user_introduction' class="ninputxt" cols="60" rows="10">{$user_arr.user_introduction}</textarea>
        <span class="Validform_checktip">必选项</span>
        </td>
    </tr>
    <tr>
        <td colspan="2">
            <button type="submit" class="btn btn-sm btn-primary" >提交</button> <span class="btn btn-sm" onClick="location.href='{:U('Mrmidi/index')}'">返回</span>
        </td>
    </tr>
</table>
</form>
<?php foreach ($mrmidi_arr as $v): ?>
    <form action="__CONTROLLER__/mrmidi_edit" method="post" style="margin:20px 0;">
        <input type="hidden" name="action" value="mrmidi_edit_action">
        <input type="hidden" name="actionedit" value="edit_mrmidi">
        <input type="hidden" name="mrmidi_user_id" value="{$v.mrmidi_user_id}">
        <input type="hidden" name="mrmidi_major_id" value="{$v.mrmidi_major_id}">
        <div class="row" style="margin:7px">
            <div ><span class="label label-danger label-lg">专业：
            <?php if ($v['mrmidi_major_id'] == 1): ?>
                电吉他
            <?php elseif ($v['mrmidi_major_id'] == 2): ?>
                爵士鼓
            <?php elseif ($v['mrmidi_major_id'] == 3): ?>
                电贝司
            <?php endif ?>
            </span></div>
        </div>
        <table class="table table-striped table-bordered table-hover" >
            <tr>
                <th>等级</th>
                <td><select name="mrmidi_level" id="" class="col-xs-6">
                    <option value="1" <?php if ($v['mrmidi_level'] == 1): ?>selected<?php endif ?>>初级</option>
                    <option value="2" <?php if ($v['mrmidi_level'] == 2): ?>selected<?php endif ?>>中级</option>
                    <option value="3" <?php if ($v['mrmidi_level'] == 3): ?>selected<?php endif ?>>高级</option>
                    <option value="4" <?php if ($v['mrmidi_level'] == 4): ?>selected<?php endif ?>>特级</option>
                </select>
                <span class="Validform_checktip">必选项</span>
                </td>
            </tr>
            <tr>
                <th>审核状态</th>
                <td>
                    <select name="mrmidi_auth_status" id=""  class="col-xs-6">
                    <option value="1" <?php if ($v['mrmidi_auth_status'] == 1): ?>selected<?php endif ?>>待审核</option>
                    <option value="2" <?php if ($v['mrmidi_auth_status'] == 2): ?>selected<?php endif ?>>审核通过</option>
                    <option value="3" <?php if ($v['mrmidi_auth_status'] == 3): ?>selected<?php endif ?>>审核不通过</option>
                </select>
                <span class="Validform_checktip">必选项</span>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <button type="submit" class="btn btn-sm btn-pink" >提交</button> <span class="btn btn-sm" onClick="location.href='{:U('Mrmidi/index')}'">返回</span>
                </td>
            </tr>
        </table>
    </form>
<?php endforeach ?>
</block>
<block name="scripts">
<script src="__PUBLIC__/assets/js/select2.js"></script>
</block>
<block name="jscript">
<script script="text/javascript">
    $(function(){
        $('#menu_user').addClass('active open');
        $('#menu_mrmidi_list').addClass('active');
    });
</script>
<script type="text/javascript">
    function votes_num() {
    	var user_votes = $('#user_votes').val();
    	var user_value = $('#user_value').val();
    	var num = user_value/user_votes;
    	var aaa = num.toFixed(2);
    	var bbb = aaa * 0.1;
    	var ccc = bbb * 100;
    	var ddd = ccc + 50;
    	var eee = ddd . toFixed(1);
    	var fff = eee + '%';
    	$('#user_pct').val(fff);
    }
    function speciality_action() {
    	var str = $('#ppppppp').select2('data');
        var lists = "";
        for (var i = 0; i < str.length; i++) {
        	//str[i].id or str[i].text
        	lists += str[i].id+',';
        };
        $('#speciality').val(lists);
    	$('#myformedit').submit();
    }
</script>
<script type="text/javascript">
    $('.date-picker').datepicker({
        autoclose: true,
        todayHighlight: true
    })

</script>

</block>